package springinpractice.ch4.r4_3.service;

@SuppressWarnings("serial")
/*
 * Author       :       Willie Wheeler and John Wheeler
 * Book         :       'Spring In Practice' [Book written by Willie Wheeler and John Wheeler]
 */

public class DuplicateRegistrationException extends Exception {
	private boolean usernameTaken;
	private boolean emailTaken;

	public DuplicateRegistrationException(boolean usernameTaken,
			boolean emailTaken) {
		this.usernameTaken = usernameTaken;
		this.emailTaken = emailTaken;
	}

	public boolean isUsernameTaken() {
		return usernameTaken;
	}

	public boolean isEmailTaken() {
		return emailTaken;
	}
}
